load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "convert.go",
        "doc.go",
        "docker_checkpoint.go",
        "docker_container.go",
        "docker_image.go",
        "docker_legacy_service.go",
        "docker_logs.go",
        "docker_sandbox.go",
        "docker_service.go",
        "docker_streaming.go",
        "exec.go",
        "helpers.go",
        "naming.go",
        "security_context.go",
        "selinux_util.go",
    ] + select({
        "@io_bazel_rules_go//go/platform:android": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:darwin": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:dragonfly": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:freebsd": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:linux": [
            "docker_image_linux.go",
            "docker_stats_linux.go",
            "helpers_linux.go",
        ],
        "@io_bazel_rules_go//go/platform:nacl": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:netbsd": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:openbsd": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:plan9": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:solaris": [
            "docker_image_unsupported.go",
            "docker_stats_unsupported.go",
            "helpers_unsupported.go",
        ],
        "@io_bazel_rules_go//go/platform:windows": [
            "docker_image_windows.go",
            "docker_stats_windows.go",
            "helpers_windows.go",
        ],
        "//conditions:default": [],
    }),
    importpath = "k8s.io/kubernetes/pkg/kubelet/dockershim",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/credentialprovider:go_default_library",
        "//pkg/kubelet/apis/cri/runtime/v1alpha2:go_default_library",
        "//pkg/kubelet/apis/kubeletconfig:go_default_library",
        "//pkg/kubelet/cm:go_default_library",
        "//pkg/kubelet/container:go_default_library",
        "//pkg/kubelet/dockershim/cm:go_default_library",
        "//pkg/kubelet/dockershim/libdocker:go_default_library",
        "//pkg/kubelet/dockershim/metrics:go_default_library",
        "//pkg/kubelet/kuberuntime:go_default_library",
        "//pkg/kubelet/leaky:go_default_library",
        "//pkg/kubelet/network:go_default_library",
        "//pkg/kubelet/network/cni:go_default_library",
        "//pkg/kubelet/network/hostport:go_default_library",
        "//pkg/kubelet/network/kubenet:go_default_library",
        "//pkg/kubelet/qos:go_default_library",
        "//pkg/kubelet/server/streaming:go_default_library",
        "//pkg/kubelet/types:go_default_library",
        "//pkg/kubelet/util/cache:go_default_library",
        "//pkg/kubelet/util/ioutils:go_default_library",
        "//pkg/kubelet/util/store:go_default_library",
        "//pkg/security/apparmor:go_default_library",
        "//pkg/util/filesystem:go_default_library",
        "//pkg/util/hash:go_default_library",
        "//pkg/util/parsers:go_default_library",
        "//vendor/github.com/armon/circbuf:go_default_library",
        "//vendor/github.com/blang/semver:go_default_library",
        "//vendor/github.com/docker/docker/api/types:go_default_library",
        "//vendor/github.com/docker/docker/api/types/container:go_default_library",
        "//vendor/github.com/docker/docker/api/types/filters:go_default_library",
        "//vendor/github.com/docker/docker/api/types/strslice:go_default_library",
        "//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library",
        "//vendor/github.com/docker/go-connections/nat:go_default_library",
        "//vendor/github.com/golang/glog:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library",
        "//vendor/k8s.io/client-go/tools/remotecommand:go_default_library",
        "//vendor/k8s.io/utils/exec:go_default_library",
    ] + select({
        "@io_bazel_rules_go//go/platform:windows": [
            "//pkg/kubelet/apis:go_default_library",
            "//pkg/kubelet/winstats:go_default_library",
        ],
        "//conditions:default": [],
    }),
)

go_test(
    name = "go_default_test",
    srcs = [
        "convert_test.go",
        "docker_checkpoint_test.go",
        "docker_container_test.go",
        "docker_image_test.go",
        "docker_sandbox_test.go",
        "docker_service_test.go",
        "helpers_test.go",
        "naming_test.go",
        "security_context_test.go",
        "selinux_util_test.go",
    ] + select({
        "@io_bazel_rules_go//go/platform:linux": [
            "helpers_linux_test.go",
        ],
        "//conditions:default": [],
    }),
    embed = [":go_default_library"],
    deps = [
        "//pkg/kubelet/apis/cri/runtime/v1alpha2:go_default_library",
        "//pkg/kubelet/container:go_default_library",
        "//pkg/kubelet/container/testing:go_default_library",
        "//pkg/kubelet/dockershim/libdocker:go_default_library",
        "//pkg/kubelet/dockershim/testing:go_default_library",
        "//pkg/kubelet/network:go_default_library",
        "//pkg/kubelet/network/testing:go_default_library",
        "//pkg/kubelet/types:go_default_library",
        "//pkg/kubelet/util/cache:go_default_library",
        "//pkg/security/apparmor:go_default_library",
        "//vendor/github.com/blang/semver:go_default_library",
        "//vendor/github.com/docker/docker/api/types:go_default_library",
        "//vendor/github.com/docker/docker/api/types/container:go_default_library",
        "//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library",
        "//vendor/github.com/docker/go-connections/nat:go_default_library",
        "//vendor/github.com/golang/mock/gomock:go_default_library",
        "//vendor/github.com/stretchr/testify/assert:go_default_library",
        "//vendor/github.com/stretchr/testify/require:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//pkg/kubelet/dockershim/cm:all-srcs",
        "//pkg/kubelet/dockershim/libdocker:all-srcs",
        "//pkg/kubelet/dockershim/metrics:all-srcs",
        "//pkg/kubelet/dockershim/remote:all-srcs",
        "//pkg/kubelet/dockershim/testing:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)
